XML::RSS Meta Bug

Shlomi Fish on 2006-10-24T21:12:44

So I continued working on XML::RSS. Then I encountered this bug. Essentially it complains about the fact that one cannot put "0" as the value of many elements. This was caused by statements such as if ($self->{channel}->{title}) that rejected the values "0", the empty string, etc. The attached patch converted it to ne '', but that was not a good solution because it would accept undef, and reject the empty string. Plus, the patch did not contain a test suite.

So I had to go over all the places in the code and write a patch that will add suitable test cases, and then fix the problem. One problem I encountered was that the default values of the fields were initialised as the empty string, which was accepted by if (defined(...)) and I had to convert them to undef (one by one).

So, 61 SVK commits, 88 individual tests, 1390 lines of the test file, and 4 days later, I fixed all these cases, and submitted a patch. Working on it proved to be fun in a braindead kind of way. I kept feeling that I want to work on it, like I was addicted to some bad drug. But now it's over.

On the plus side, I was able to refactor some of the XML::RSS code in the process, and also found a way to create Test::Run targets into a Makefile.PL+ Test::Manifest setup.

In other news:

  1. Someone reported that he could not install Error.pm using CPAN.pm. Turns out he had Module::Build as the default and ran into this bug, which I reproduced, isolated and reported.
  2. Trying to subscribe to the XML-RSS Request Tracker traffic caused me to run into a strange rt.cpan.org bug

And with this hopeful tone - good bye, and happy hacking.


Common bug

nik on 2006-10-25T11:46:05

That's a common bug. I recently ran in to the same thing in Text::Diff::Parser (22284)